package com.invengo.base.config;

import android.app.Application;

/**
 * Created by goldze on 2018/6/21 0021.
 * 组件生命周期反射类名管理，在这里注册需要初始化的组件，通过反射动态调用各个组件的初始化方法
 * 注意：以下模块中初始化的Module类不能被混淆
 */

public class ModuleLifecycleReflexs {
    private static final String BaseInit = "com.invengo.base.base.BaseModuleInit";

    //手持机模块
    private static final String CheckInit = "com.invengo.module_check.CheckModuleInit";
    //机器人模块
    private static final String RobotInit = "com.invengo.module_robot.RobotModuleInit";
    //首页业务模块
    private static final String HomeInit = "com.invengo.home.HomeModuleInit";
    //工作业务模块
    private static final String WorkInit = "com.invengo.work.WorkModuleInit";
    //消息业务模块
    private static final String MsgInit =  "com.invengo.msg.MsgModuleInit";
    //用户业务模块
    private static final String UserInit = "com.invengo.user.UserModuleInit";

    public static String[] getInitModuleNames(Application application){
        String[] moduleNames = null;
        String packageName = application.getPackageName();
        switch (packageName) {
            case "com.invengo.module_check":
                moduleNames= new String[]{BaseInit, CheckInit};
                break;
            case "com.invengo.module_robot":
                moduleNames= new String[]{BaseInit, RobotInit};
                break;
        }
        return moduleNames;
    }
//    public static String[] initModuleNames = {BaseInit,CheckInit, RobotInit};
}
